﻿@{
    Layout = null;
    ViewBag.Title = "Login";
}

<html class="x-admin-sm">
<head>
    <meta charset="UTF-8">
    <title>物流管理系统后台</title>
    <meta name="renderer" content="webkit|ie-comp|ie-stand">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    @*<meta name="viewport" content="width=device-width,user-scalable=yes, minimum-scale=0.4, initial-scale=0.8,target-densitydpi=low-dpi" />*@
    <meta http-equiv="Cache-Control" content="no-siteapp" />
    <link rel="stylesheet" href="~/Content/font.css">
    <link rel="stylesheet" href="~/Content/login.css">
    <link rel="stylesheet" href="~/Content/framemain.css">
    <script type="text/javascript" src="~/Scripts/jquery-3.3.1.min.js"></script>
    <script src="~/Content/layui/layui.js" charset="utf-8"></script>
    <style type="text/css">
        .login-tips {
            color: #83b7ce;
            font-size: 10px;
        }
        .x-admin-sm .layui-btn {
            height:40px;
            line-height: 30px;
            padding: 0 10px;
            margin-top: -45px;
            margin-right: 5px;
            float: right;
        }
        .layui-btn-primary {
            border:none;
            background-color: #fff;
            color: #555;
        }
    </style>
    <script type="text/javascript">
        window.onload = function ()
        {
            if (window.top.location.href != window.location.href) {
                top.location.reload(true);
            }
        }
        function submitlogin() {
            if ($("#username").val() != "" && $("#password").val()!="") {
              
            }
            $.post("/Home/LoginPost", { username: $("#username").val(), password: $("#password").val() }, function (obj) {
                if (obj.code == 200) {
                    location.href = "/Home/Index";
                }
                else {
                    layer.msg(obj.msg);
                }
            })
        }
    </script>
</head>
<body class="login-bg">
    <div class="login layui-anim layui-anim-up">
        <div class="message">物流管理系统后台-登录</div>
        <div id="darkbannerwrap"></div>
        <form id="form" name="form" class="layui-form">
            <div class="layui-input-inline" style="width:100%">
                <input id="username" name="username" type="text" class="layui-input" lay-verify="required" placeholder="用户名" value="" title="请输入您的登录用户名" />
            </div>
            <hr class="hr15">
            <div class="layui-input-inline" style="width:100%">
                <input id="password" name="password" type="password" runat="server" data="passworedtype" class="layui-input" lay-verify="required" placeholder="密码" value="" title="请输入登录密码" />
                <button type="button" class="layui-btn layui-btn-primary" id="eye">
                    <i class="layui-icon layui-icon-password"></i>
                </button>
            </div>
            <hr class="hr15">
            <input id="btnsubmit" value="登 录" type="button" onclick="submitlogin()" lay-submit lay-filter="login" style="width:100%;" />
            <hr class="hr20">
            <div class="login-tips"><p id="msgtip" runat="server"></p></div>
        </form>
    </div>

    <script>
        $(function () {
            layui.use('form', function () {
                var form = layui.form;
                var $ = layui.jquery;
                layer.msg('请完成登录!', function () {
                    //关闭后的操作
                });

                $('#eye').on('click', function () {
                    var type = $('#password').attr('type') === 'text' ? 'password' : 'text';
                    $('#password').attr('type', type);
                    if (type === 'text') {
                        $(this).find('i').removeClass('layui-icon-password').addClass('layui-icon-hidepassword');
                    } else {
                        $(this).find('i').removeClass('layui-icon-hidepassword').addClass('layui-icon-password');
                    }
                });
            })
        })
    </script>
    <!-- 底部结束 -->
</body>
</html>

